package com.hist.dao;

import com.hist.pojo.User;
import org.apache.ibatis.session.SqlSession;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;

/**
 * @auther Ren Gaoshuai
 * @date 2021-04-07 19:48
 * 
 * 使用继承类获取session对象
 **/
public class UserMapperImpl2 extends SqlSessionDaoSupport implements UserMapper {
    public List<User> queryUser() {
        SqlSession sqlSession = getSqlSession();
        UserMapper mapper = sqlSession.getMapper(UserMapper.class);
        return mapper.queryUser();
    }
}
